﻿do
	IGAS:NewAddon("IGAS_Studio")

	local _DB

	------------------------------------------------------------
	-- ScriptType
	------------------------------------------------------------
	_DB = CreateHelpDB(IGAS.GUI.Widget.EditBox, "ScriptType")
	_DB:SetBaseHelpDB(CreateHelpDB(IGAS.GUI.Widget.FontFrame, "ScriptType"))

	------------------------------------------------------------
	-- Function
	------------------------------------------------------------
	_DB = CreateHelpDB(IGAS.GUI.Widget.EditBox, "Function")
	_DB:SetBaseHelpDB(CreateHelpDB(IGAS.GUI.Widget.FontFrame, "Function"))

	_DB:AddCodeHelp("GetHistoryLines", [=[Returns the maximum number of history lines stored by the edit box]=], [=[GetHistoryLines()]=])
	_DB:AddCodeHelp("GetBlinkSpeed", [=[Returns the rate at which the text insertion blinks when the edit box is focused]=], [=[GetBlinkSpeed()]=])
	_DB:AddCodeHelp("SetMaxLetters", [=[Sets the maximum number of text characters allowed in the edit box]=], [=[SetMaxLetters(maxLetters)]=])
	_DB:AddCodeHelp("IsNumeric", [=[Returns whether the edit box only accepts numeric input]=], [=[IsNumeric()]=])
	_DB:AddCodeHelp("GetNumber", [=[Returns the contents of the edit box as a number]=], [=[GetNumber()]=])
	_DB:AddCodeHelp("SetPassword", [=[Sets whether the text entered in the edit box is masked]=], [=[SetPassword(enable)]=])
	_DB:AddCodeHelp("SetBlinkSpeed", [=[Sets the rate at which the text insertion blinks when the edit box is focused]=], [=[SetBlinkSpeed(duration)]=])
	_DB:AddCodeHelp("GetMaxLetters", [=[Returns the maximum number of text characters allowed in the edit box]=], [=[GetMaxLetters()]=])
	_DB:AddCodeHelp("SetFont", [=[Sets the font instance's basic font properties]=], [=[SetFont("filename", fontHeight, "flags")]=])
	_DB:AddCodeHelp("SetMaxBytes", [=[Sets the maximum number of bytes of text allowed in the edit box]=], [=[SetMaxBytes(maxBytes)]=])
	_DB:AddCodeHelp("GetNumLetters", [=[Returns the number of text characters in the edit box]=], [=[GetNumLetters()]=])
	_DB:AddCodeHelp("GetMaxBytes", [=[Returns the maximum number of bytes of text allowed in the edit box]=], [=[GetMaxBytes()]=])
	_DB:AddCodeHelp("GetAltArrowKeyMode", [=[Returns whether arrow keys are ignored by the edit box unless the Alt key is held]=], [=[GetAltArrowKeyMode()]=])
	_DB:AddCodeHelp("GetIndentedWordWrap", [=[Returns whether long lines of text are indented when wrapping]=], [=[GetIndentedWordWrap()]=])
	_DB:AddCodeHelp("SetAltArrowKeyMode", [=[Sets whether arrow keys are ignored by the edit box unless the Alt key is held]=], [=[SetAltArrowKeyMode(enable)]=])
	_DB:AddCodeHelp("GetInputLanguage", [=[Returns the currently selected keyboard input language (character set / input method)]=], [=[GetInputLanguage()]=])
	_DB:AddCodeHelp("GetTextInsets", [=[Returns the insets from the edit box's edges which determine its interactive text area]=], [=[GetTextInsets()]=])
	_DB:AddCodeHelp("SetCursorPosition", [=[Sets the cursor position in the edit box]=], [=[SetCursorPosition(position)]=])
	_DB:AddCodeHelp("IsMultiLine", [=[Returns whether the edit box shows more than one line of text]=], [=[IsMultiLine()]=])
	_DB:AddCodeHelp("SetAutoFocus", [=[Sets whether the edit box automatically acquires keyboard input focus]=], [=[SetAutoFocus(enable)]=])
	_DB:AddCodeHelp("SetIndentedWordWrap", [=[Sets whether long lines of text are indented when wrapping]=], [=[SetIndentedWordWrap(indent)]=])
	_DB:AddCodeHelp("IsInIMECompositionMode", [=[Returns whether the edit box is in Input Method Editor composition mode]=], [=[IsInIMECompositionMode()]=])
	_DB:AddCodeHelp("IsPassword", [=[Returns whether the text entered in the edit box is masked]=], [=[IsPassword()]=])
	_DB:AddCodeHelp("SetNumeric", [=[Sets whether the edit box only accepts numeric input]=], [=[SetNumeric(enable)]=])
	_DB:AddCodeHelp("AddHistoryLine", [=[Adds a line of text to the edit box's stored history]=], [=[AddHistoryLine("text")]=])
	_DB:AddCodeHelp("HasFocus", [=[Returns whether the edit box is currently focused for keyboard input]=], [=[HasFocus()]=])
	_DB:AddCodeHelp("HighlightText", [=[Selects all or a portion of the text in the edit box]=], [=[HighlightText([start [, end]])]=])
	_DB:AddCodeHelp("ToggleInputLanguage", [=[Switches the edit box's language input mode]=], [=[ToggleInputLanguage()]=])
	_DB:AddCodeHelp("SetHistoryLines", [=[Sets the maximum number of history lines stored by the edit box]=], [=[SetHistoryLines(count)]=])
	_DB:AddCodeHelp("SetFocus", [=[Focuses the edit box for keyboard input]=], [=[SetFocus()]=])
	_DB:AddCodeHelp("SetText", [=[Sets the text displayed as the button's label]=], [=[SetText("text")]=])
	_DB:AddCodeHelp("Insert", [=[Inserts text into the edit box at the current cursor position]=], [=[Insert("text")]=])
	_DB:AddCodeHelp("SetMultiLine", [=[Sets whether the edit box shows more than one line of text]=], [=[SetMultiLine(multiLine)]=])
	_DB:AddCodeHelp("SetTextInsets", [=[Sets the insets from the edit box's edges which determine its interactive text area]=], [=[SetTextInsets(left, right, top, bottom)]=])
	_DB:AddCodeHelp("IsAutoFocus", [=[Returns whether the edit box automatically acquires keyboard input focus]=], [=[IsAutoFocus()]=])
	_DB:AddCodeHelp("ClearFocus", [=[Releases keyboard input focus from the edit box]=], [=[ClearFocus()]=])
	_DB:AddCodeHelp("SetNumber", [=[Sets the contents of the edit box to a number]=], [=[SetNumber(num)]=])
	_DB:AddCodeHelp("GetText", [=[Returns the text of the button's label]=], [=[GetText()]=])
	_DB:AddCodeHelp("GetCursorPosition", [=[Returns the current cursor position inside edit box]=], [=[GetCursorPosition()]=])
	------------------------------------------------------------
	-- Property
	------------------------------------------------------------
	_DB = CreateHelpDB(IGAS.GUI.Widget.EditBox, "Property")
	_DB:SetBaseHelpDB(CreateHelpDB(IGAS.GUI.Widget.FontFrame, "Property"))

	_DB:AddCodeHelp("MultiLine", [[true if the edit box shows more than one line of text]], IGAS:GetPropertyType("boolean"))
	_DB:AddCodeHelp("CursorPosition", [[the current cursor position inside edit box]], IGAS:GetPropertyType("number"))
	_DB:AddCodeHelp("Focused", [[true if the edit box is currently focused]], IGAS:GetPropertyType("boolean"))
	_DB:AddCodeHelp("Editable", [[true if the edit box is editable]], IGAS:GetPropertyType("boolean"))
	_DB:AddCodeHelp("Text", [[the edit box's text contents]], IGAS:GetPropertyType("string"))
	_DB:AddCodeHelp("AutoFocus", [[true if the edit box automatically acquires keyboard input focus]], IGAS:GetPropertyType("boolean"))
	_DB:AddCodeHelp("BlinkSpeed", [[the rate at which the text insertion blinks when the edit box is focused]], IGAS:GetPropertyType("number"))
	_DB:AddCodeHelp("NumericOnly", [[true if the edit box only accepts numeric input]], IGAS:GetPropertyType("boolean"))
	_DB:AddCodeHelp("Number", [[the contents of the edit box as a number]], IGAS:GetPropertyType("number"))
	_DB:AddCodeHelp("MaxBytes", [[the maximum number of bytes of text allowed in the edit box, default is 0(Infinite)]], IGAS:GetPropertyType("number"))
	_DB:AddCodeHelp("TextInsets", [[the insets from the edit box's edges which determine its interactive text area]], IGAS:GetPropertyType("RectInset"))
	_DB:AddCodeHelp("AltArrowKeyMode", [[true if the arrow keys are ignored by the edit box unless the Alt key is held]], IGAS:GetPropertyType("boolean"))
	_DB:AddCodeHelp("HistoryLines", [[the maximum number of history lines stored by the edit box]], IGAS:GetPropertyType("number"))
	_DB:AddCodeHelp("MaxLetters", [[the maximum number of text characters allowed in the edit box]], IGAS:GetPropertyType("number"))
	_DB:AddCodeHelp("Password", [[true if the text entered in the edit box is masked]], IGAS:GetPropertyType("boolean"))
end
